<template>
	<div class="main">
		<div style="background: #fff;width: 7.5rem;">
			<go-back aa='../chooseCourse/advantageTest'></go-back>
		</div>

		<div class="outDiv">
			<scroller style="top: 0.88rem;">
				<RaterList :headerTitle="headerTitle" :sendLists="sendLists"></RaterList>
			</scroller>
		</div>
	</div>
</template>

<script>
	import RaterList from '~/components/raterList'
	import goBack from '~/components/goBack'
	import axios1 from '~/plugins/axios1';
	import ls from 'store2'
	export default {
		components: {
			RaterList,
			goBack
		},
		created() {
			this.commonJs.gologins();
			this.types = this.$route.query.type * 1;
			console.log(this.types)
			switch (this.types) {
				case 1:
					this.headerTitle = '学习成绩测试'
					break;
				case 2:
					this.headerTitle = '科目兴趣测试'
					break;
				case 3:
					this.headerTitle = '学习方法测试'
					break;
				case 4:
					this.headerTitle = '师资水平测试'
					break;
				case 5:
					this.headerTitle = '家长意见测试'
					break;
				default:
					this.headerTitle = '同学意见测试'
					break;
			}
		},
		data() {
			return {
				headerTitle: '学习成绩测试',
				sendLists: ['地理', '历史', '政治', '物理', '化学', '生物'],
				types: 0
			}
		},
				mounted: function() {

			if(this.commonJs.isTerminal()=='isAndroid'){
				if (window.history && window.history.pushState) {
				history.pushState(null, null, document.URL);
				window.addEventListener('popstate', this.fun, false); //false阻止默认事件 
			}
			}
		
		},
		destroyed() {
			// this.commonJs.xahui('../chooseCourse/advantageTest')
			window.removeEventListener('popstate', this.fun, false); 
		},
		methods: {
					fun() {
			this.$router.replace({
				path: '../chooseCourse/advantageTest'
			
			})
		
		},
		}
	}
</script>

<style lang="less" scoped>
	.outDiv {
		width: 100%;
		height: 100vh;
		background: #fff;
	}
</style>
